package com.hc.service.impl;

import com.hc.domain.Menu;
import com.hc.domain.User;
import com.hc.mapper.UserMapper;
import com.hc.service.MenuService;
import com.hc.service.RoleService;
import com.hc.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 系统用户 服务实现类
 * </p>
 *
 * @author wzf
 * @since 2024-09-10
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {



    @Override
    public List<String> listPermissionsByUserName(String userName) {
        List<String>   perms =baseMapper.listPermsByUserName(userName);
        return perms;
    }

    @Override
    public List<String> listRolesByUserName(String userName) {
        List<String> roles = baseMapper.listRolesByUserName(userName);
        return roles;
    }

    @Override
    public List<Menu> listMenus(String userName) {
        List<Menu> menus =  baseMapper.listMenus(userName);
        return menus;

    }

    @Override
    public List<User> listUser(User user) {
        List<User>  users =baseMapper.listUser(user);
        return users;
    }
}
